package com.zj.study.payment.service.impl;

import com.zj.study.payment.service.UnitePayment;
import org.springframework.stereotype.Component;

/**
 * @author 赵赳
 * @since 2022/7/21 11:32
 */
@Component
public class DefaultUnitePayment implements UnitePayment {


  @Override
  public boolean pay(Integer type) {
    switch (type) {
      case 1:
        return new AlipayPaymentServiceImpl().pay(type);
      case 2:
        return new WechatPaymentServiceImpl().pay(type);
    }
    return false;
  }


}
